package com.zr.userrepay.mapper;

import com.zr.userrepay.pojo.UserRelation;
import com.zr.userrepay.pojo.UserRepay;
import com.zr.userrepay.pojo.UserRepayUpdateVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Created by star on 2019/7/3.
 */
@Mapper
public interface UserRepayMapper {

    //新增联系人信息表
    @Insert("insert into userrepay (loginId,bankCardAccount,openingBank,bankPhone,createTime,createName,updateTime," +
            "updateName) values (#{loginId},#{bankCardAccount},#{openingBank},#{bankPhone},#{createTime},#{createName},#{updateTime},#{updateName}) ")
    int addUserRelation(UserRepay userRepay);
    //根据loginId查询 用于上一步 回显
    @Select("select * from userrepay where loginId = #{loginId}")
    UserRepay findByLoginId(Integer loginId);
    //修改联系人信息表
    @Update("update userrepay set bankCardAccount=#{bankCardAccount},openingBank=#{openingBank},bankPhone=#{bankPhone},updateTime=#{updateTime}," +
            "updateName=#{updateName} where loginId=#{loginId} ")
    int updateUserRelation(UserRepay userRepay);






}
